import type { QuestionAnswerResponse, CreateQuestionAnswerRequest, CreateQuestionAnswerResponse } from '../models/questionAnswerModel';
import instance from '../utils/request';

// 获取问题答案列表
export const getQuestionAnswerList = (categoryId: string): Promise<QuestionAnswerResponse> => {
  return instance.get(`/question/answers/${categoryId}`);
};

// 添加问题答案
export const createQuestionAnswer = (data: CreateQuestionAnswerRequest): Promise<CreateQuestionAnswerResponse> => {
  return instance.post('/question/answers/add', data);
};
